翻訳と辞書
Words near each other
・ Selebar
・ Selebi
・ Selebi-Phikwe
・ Selebi-Phikwe Airport
・ Selebino
・ Selec
・ Selecciones Ilustradas
・ Selección Canina
・ Seleciköse, Aksaray
・ Seleco
・ Select
・ Select (album)
・ SELECT (Electrical Contractors' Association of Scotland)
・ Select (magazine)
・ Select (SQL)
Select (Unix)
・ Select agent
・ Select Biosciences
・ Select Bus Service
・ Select Citywalk
・ Select Comfort
・ Select committee
・ Select Committee of the House of Commons on the Civil Government of Canada
・ Select Committee of the House of Lords on the Women's Royal Air Force
・ Select Committee on Import Duties
・ Select Committee on Intelligence
・ Select Committee on Reserves (Reserve 43131) Bill 2003
・ Select Committee on Scientific Instruction
・ Select Committee on Statutory Instruments
・ Select Committee on the Modernisation of the House of Commons


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Select (Unix) : ウィキペディア英語版
Select (Unix)

select is a system call and application programming interface (API) in Unix-like and POSIX-compliant operating systems for examining the status of file descriptors of open input/output channels. The select system call is similar to the ''poll'' facility introduced in UNIX System V and later operating systems.
In the C programming language, the select system call is declared in the header file sys/select.h or unistd.h, and has the following syntax:

int select(int nfds, fd_set
*readfds, fd_set
*writefds, fd_set
*errorfds, struct timeval
*timeout);

fd_set type arguments may be manipulated with four utility macros: FD_SET(), FD_CLR(), FD_ZERO(), and FD_ISSET().
Select returns the total number of bits set in readfds, writefds and errorfds, or zero if the timeout expired, and -1 on error.
The sets of file descriptor used in select are finite in size, depending on the operating system. The newer system call ''poll'' provides a more flexible solution.
== Example ==

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define PORT "9421"
/
* function prototypes
*/
void die(const char
*);
int main(int argc, char
*
*argv)
if (-1 == (bind(sockfd, res->ai_addr, res->ai_addrlen)))

break;
}
if (-1 == sockfd)
exit(EXIT_FAILURE);
freeaddrinfo(res0);
if (-1 == (listen(sockfd, 32)))
die("listen()");
if (-1 == (fcntl(sockfd, F_SETFD, O_NONBLOCK)))
die("fcntl()");
FD_ZERO(&master);
FD_ZERO(&readfds);
FD_SET(sockfd, &master);
maxfd = sockfd;
while (1)

}
else

}
}
}
return 0;
}
void die(const char
*msg)


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Select (Unix)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.